<template>
    <div>
        <h2> {{ modelValue }} </h2>
        <button @click="add">+</button>
        <button @click="don">-</button>
    </div>
</template>

<script setup>

import { ref } from 'vue';

const props = defineProps(['modelValue'])

const emits = defineEmits(['update:modelValue'])

// const num = ref(100)

const add = () => {
    emits('update:modelValue', props.modelValue + 1)
}
const don = () => {
    emits('update:modelValue', props.modelValue - 1)
}



</script>

<style lang="scss" scoped>

</style>